home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / risc_src.lha / risc_sources / xlib / xws3.t < prev    next >
Text File  |  1990-06-01  |  16KB  |  379 lines

  1. (HERALD XWS3 (ENV TSYS (XLIB INTERFACE)))
  2.  
  3. (DEFINE-FOREIGN XVISUALIDFROMVISUAL*
  4.                 ("XVisualIDFromVisual" (IN REP/C-POINTER))
  5.                 REP/INTEGER)
  6. (DEFINE (XVISUALIDFROMVISUAL VISUAL)
  7.         (LET* ((VISUAL (CHK-VISUALP VISUAL))
  8.                (RETURN-VALUE (XVISUALIDFROMVISUAL* VISUAL)))
  9.               RETURN-VALUE))
  10. (DEFINE-FOREIGN XCREATEWINDOW*
  11.                 ("XCreateWindow" (IN REP/C-POINTER)
  12.                                  (IN REP/INTEGER)
  13.                                  (IN REP/INTEGER)
  14.                                  (IN REP/INTEGER)
  15.                                  (IN REP/INTEGER)
  16.                                  (IN REP/INTEGER)
  17.                                  (IN REP/INTEGER)
  18.                                  (IN REP/INTEGER)
  19.                                  (IN REP/INTEGER)
  20.                                  (IN REP/C-POINTER)
  21.                                  (IN REP/INTEGER)
  22.                                  (IN REP/C-POINTER))
  23.                 REP/INTEGER)
  24. (DEFINE (XCREATEWINDOW DPY
  25.                        PARENT
  26.                        X
  27.                        Y
  28.                        WIDTH
  29.                        HEIGHT
  30.                        BORDERWIDTH
  31.                        DEPTH
  32.                        CLASS
  33.                        VISUAL
  34.                        VALUEMASK
  35.                        ATTRIBUTES)
  36.         (LET* ((DPY (CHK-DISPLAYP DPY))
  37.                (PARENT PARENT)
  38.                (X X)
  39.                (Y Y)
  40.                (WIDTH WIDTH)
  41.                (HEIGHT HEIGHT)
  42.                (BORDERWIDTH BORDERWIDTH)
  43.                (DEPTH DEPTH)
  44.                (CLASS CLASS)
  45.                (VISUAL (CHK-VISUALP VISUAL))
  46.                (VALUEMASK VALUEMASK)
  47.                (ATTRIBUTES (CHK-XSETWINDOWATTRIBUTESP ATTRIBUTES))
  48.                (RETURN-VALUE (XCREATEWINDOW* DPY
  49.                                              PARENT
  50.                                              X
  51.                                              Y
  52.                                              WIDTH
  53.                                              HEIGHT
  54.                                              BORDERWIDTH
  55.                                              DEPTH
  56.                                              CLASS
  57.                                              VISUAL
  58.                                              VALUEMASK
  59.                                              ATTRIBUTES)))
  60.               RETURN-VALUE))
  61. (DEFINE-FOREIGN XCREATESIMPLEWINDOW*
  62.                 ("XCreateSimpleWindow" (IN REP/C-POINTER)
  63.                                        (IN REP/INTEGER)
  64.                                        (IN REP/INTEGER)
  65.                                        (IN REP/INTEGER)
  66.                                        (IN REP/INTEGER)
  67.                                        (IN REP/INTEGER)
  68.                                        (IN REP/INTEGER)
  69.                                        (IN REP/INTEGER)
  70.                                        (IN REP/INTEGER))
  71.                 REP/INTEGER)
  72. (DEFINE (XCREATESIMPLEWINDOW DPY
  73.                              PARENT
  74.                              X
  75.                              Y
  76.                              WIDTH
  77.                              HEIGHT
  78.                              BORDERWIDTH
  79.                              BORDER
  80.                              BACKGROUND)
  81.         (LET* ((DPY (CHK-DISPLAYP DPY))
  82.                (PARENT PARENT)
  83.                (X X)
  84.                (Y Y)
  85.                (WIDTH WIDTH)
  86.                (HEIGHT HEIGHT)
  87.                (BORDERWIDTH BORDERWIDTH)
  88.                (BORDER BORDER)
  89.                (BACKGROUND BACKGROUND)
  90.                (RETURN-VALUE (XCREATESIMPLEWINDOW* DPY
  91.                                                    PARENT
  92.                                                    X
  93.                                                    Y
  94.                                                    WIDTH
  95.                                                    HEIGHT
  96.                                                    BORDERWIDTH
  97.                                                    BORDER
  98.                                                    BACKGROUND)))
  99.               RETURN-VALUE))
  100. (DEFINE-FOREIGN XDESTROYWINDOW*
  101.                 ("XDestroyWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
  102.                 IGNORE)
  103. (DEFINE (XDESTROYWINDOW DPY W)
  104.         (LET* ((DPY (CHK-DISPLAYP DPY))
  105.                (W W)
  106.                (RETURN-VALUE (BLOCK (XDESTROYWINDOW* DPY W) '())))
  107.               RETURN-VALUE))
  108. (DEFINE-FOREIGN XDESTROYSUBWINDOWS*
  109.                 ("XDestroySubwindows" (IN REP/C-POINTER) (IN REP/INTEGER))
  110.                 IGNORE)
  111. (DEFINE (XDESTROYSUBWINDOWS DPY WIN)
  112.         (LET* ((DPY (CHK-DISPLAYP DPY))
  113.                (WIN WIN)
  114.                (RETURN-VALUE (BLOCK (XDESTROYSUBWINDOWS* DPY WIN) '())))
  115.               RETURN-VALUE))
  116. (DEFINE-FOREIGN XMAPWINDOW*
  117.                 ("XMapWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
  118.                 IGNORE)
  119. (DEFINE (XMAPWINDOW DPY W)
  120.         (LET* ((DPY (CHK-DISPLAYP DPY))
  121.                (W W)
  122.                (RETURN-VALUE (BLOCK (XMAPWINDOW* DPY W) '())))
  123.               RETURN-VALUE))
  124. (DEFINE-FOREIGN XMAPRAISED*
  125.                 ("XMapRaised" (IN REP/C-POINTER) (IN REP/INTEGER))
  126.                 IGNORE)
  127. (DEFINE (XMAPRAISED DPY W)
  128.         (LET* ((DPY (CHK-DISPLAYP DPY))
  129.                (W W)
  130.                (RETURN-VALUE (BLOCK (XMAPRAISED* DPY W) '())))
  131.               RETURN-VALUE))
  132. (DEFINE-FOREIGN XMAPSUBWINDOWS*
  133.                 ("XMapSubwindows" (IN REP/C-POINTER) (IN REP/INTEGER))
  134.                 IGNORE)
  135. (DEFINE (XMAPSUBWINDOWS DPY WIN)
  136.         (LET* ((DPY (CHK-DISPLAYP DPY))
  137.                (WIN WIN)
  138.                (RETURN-VALUE (BLOCK (XMAPSUBWINDOWS* DPY WIN) '())))
  139.               RETURN-VALUE))
  140. (DEFINE-FOREIGN XUNMAPWINDOW*
  141.                 ("XUnmapWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
  142.                 IGNORE)
  143. (DEFINE (XUNMAPWINDOW DPY W)
  144.         (LET* ((DPY (CHK-DISPLAYP DPY))
  145.                (W W)
  146.                (RETURN-VALUE (BLOCK (XUNMAPWINDOW* DPY W) '())))
  147.               RETURN-VALUE))
  148. (DEFINE-FOREIGN XUNMAPSUBWINDOWS*
  149.                 ("XUnmapSubwindows" (IN REP/C-POINTER) (IN REP/INTEGER))
  150.                 IGNORE)
  151. (DEFINE (XUNMAPSUBWINDOWS DPY WIN)
  152.         (LET* ((DPY (CHK-DISPLAYP DPY))
  153.                (WIN WIN)
  154.                (RETURN-VALUE (BLOCK (XUNMAPSUBWINDOWS* DPY WIN) '())))
  155.               RETURN-VALUE))
  156. (DEFINE-FOREIGN XCONFIGUREWINDOW*
  157.                 ("XConfigureWindow" (IN REP/C-POINTER)
  158.                                     (IN REP/INTEGER)
  159.                                     (IN REP/INTEGER)
  160.                                     (IN REP/C-POINTER))
  161.                 IGNORE)
  162. (DEFINE (XCONFIGUREWINDOW DPY W MASK CHANGES)
  163.         (LET* ((DPY (CHK-DISPLAYP DPY))
  164.                (W W)
  165.                (MASK MASK)
  166.                (CHANGES (CHK-XWINDOWCHANGESP CHANGES))
  167.                (RETURN-VALUE (BLOCK (XCONFIGUREWINDOW* DPY W MASK CHANGES)
  168.                                     '())))
  169.               RETURN-VALUE))
  170. (DEFINE-FOREIGN XMOVEWINDOW*
  171.                 ("XMoveWindow" (IN REP/C-POINTER)
  172.                                (IN REP/INTEGER)
  173.                                (IN REP/INTEGER)
  174.                                (IN REP/INTEGER))
  175.                 IGNORE)
  176. (DEFINE (XMOVEWINDOW DPY W X Y)
  177.         (LET* ((DPY (CHK-DISPLAYP DPY))
  178.                (W W)
  179.                (X X)
  180.                (Y Y)
  181.                (RETURN-VALUE (BLOCK (XMOVEWINDOW* DPY W X Y) '())))
  182.               RETURN-VALUE))
  183. (DEFINE-FOREIGN XRESIZEWINDOW*
  184.                 ("XResizeWindow" (IN REP/C-POINTER)
  185.                                  (IN REP/INTEGER)
  186.                                  (IN REP/INTEGER)
  187.                                  (IN REP/INTEGER))
  188.                 IGNORE)
  189. (DEFINE (XRESIZEWINDOW DPY W WIDTH HEIGHT)
  190.         (LET* ((DPY (CHK-DISPLAYP DPY))
  191.                (W W)
  192.                (WIDTH WIDTH)
  193.                (HEIGHT HEIGHT)
  194.                (RETURN-VALUE (BLOCK (XRESIZEWINDOW* DPY W WIDTH HEIGHT)
  195.                                     '())))
  196.               RETURN-VALUE))
  197. (DEFINE-FOREIGN XMOVERESIZEWINDOW*
  198.                 ("XMoveResizeWindow" (IN REP/C-POINTER)
  199.                                      (IN REP/INTEGER)
  200.                                      (IN REP/INTEGER)
  201.                                      (IN REP/INTEGER)
  202.                                      (IN REP/INTEGER)
  203.                                      (IN REP/INTEGER))
  204.                 IGNORE)
  205. (DEFINE (XMOVERESIZEWINDOW DPY W X Y WIDTH HEIGHT)
  206.         (LET* ((DPY (CHK-DISPLAYP DPY))
  207.                (W W)
  208.                (X X)
  209.                (Y Y)
  210.                (WIDTH WIDTH)
  211.                (HEIGHT HEIGHT)
  212.                (RETURN-VALUE (BLOCK (XMOVERESIZEWINDOW* DPY W X Y WIDTH HEIGHT)
  213.                                     '())))
  214.               RETURN-VALUE))
  215. (DEFINE-FOREIGN XSETWINDOWBORDERWIDTH*
  216.                 ("XSetWindowBorderWidth" (IN REP/C-POINTER)
  217.                                          (IN REP/INTEGER)
  218.                                          (IN REP/INTEGER))
  219.                 IGNORE)
  220. (DEFINE (XSETWINDOWBORDERWIDTH DPY W WIDTH)
  221.         (LET* ((DPY (CHK-DISPLAYP DPY))
  222.                (W W)
  223.                (WIDTH WIDTH)
  224.                (RETURN-VALUE (BLOCK (XSETWINDOWBORDERWIDTH* DPY W WIDTH)
  225.                                     '())))
  226.               RETURN-VALUE))
  227. (DEFINE-FOREIGN XRAISEWINDOW*
  228.                 ("XRaiseWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
  229.                 IGNORE)
  230. (DEFINE (XRAISEWINDOW DPY W)
  231.         (LET* ((DPY (CHK-DISPLAYP DPY))
  232.                (W W)
  233.                (RETURN-VALUE (BLOCK (XRAISEWINDOW* DPY W) '())))
  234.               RETURN-VALUE))
  235. (DEFINE-FOREIGN XLOWERWINDOW*
  236.                 ("XLowerWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
  237.                 IGNORE)
  238. (DEFINE (XLOWERWINDOW DPY W)
  239.         (LET* ((DPY (CHK-DISPLAYP DPY))
  240.                (W W)
  241.                (RETURN-VALUE (BLOCK (XLOWERWINDOW* DPY W) '())))
  242.               RETURN-VALUE))
  243. (DEFINE-FOREIGN XCIRCULATESUBWINDOWS*
  244.                 ("XCirculateSubwindows" (IN REP/C-POINTER)
  245.                                         (IN REP/INTEGER)
  246.                                         (IN REP/INTEGER))
  247.                 IGNORE)
  248. (DEFINE (XCIRCULATESUBWINDOWS DPY W DIRECTION)
  249.         (LET* ((DPY (CHK-DISPLAYP DPY))
  250.                (W W)
  251.                (DIRECTION DIRECTION)
  252.                (RETURN-VALUE (BLOCK (XCIRCULATESUBWINDOWS* DPY W DIRECTION)
  253.                                     '())))
  254.               RETURN-VALUE))
  255. (DEFINE-FOREIGN XCIRCULATESUBWINDOWSUP*
  256.                 ("XCirculateSubwindowsUp" (IN REP/C-POINTER) (IN REP/INTEGER))
  257.                 IGNORE)
  258. (DEFINE (XCIRCULATESUBWINDOWSUP DPY W)
  259.         (LET* ((DPY (CHK-DISPLAYP DPY))
  260.                (W W)
  261.                (RETURN-VALUE (BLOCK (XCIRCULATESUBWINDOWSUP* DPY W) '())))
  262.               RETURN-VALUE))
  263. (DEFINE-FOREIGN XCIRCULATESUBWINDOWSDOWN*
  264.                 ("XCirculateSubwindowsDown" (IN REP/C-POINTER) (IN REP/INTEGER))
  265.                 IGNORE)
  266. (DEFINE (XCIRCULATESUBWINDOWSDOWN DPY W)
  267.         (LET* ((DPY (CHK-DISPLAYP DPY))
  268.                (W W)
  269.                (RETURN-VALUE (BLOCK (XCIRCULATESUBWINDOWSDOWN* DPY W)
  270.                                     '())))
  271.               RETURN-VALUE))
  272. (DEFINE-FOREIGN XRESTACKWINDOWS*
  273.                 ("XRestackWindows" (IN REP/C-POINTER)
  274.                                    (IN REP/C-POINTER)
  275.                                    (IN REP/INTEGER))
  276.                 IGNORE)
  277. (DEFINE (XRESTACKWINDOWS DPY WINDOWS COUNT)
  278.         (LET* ((DPY (CHK-DISPLAYP DPY))
  279.                (WINDOWS (CHK-UNSIGNEDAP WINDOWS))
  280.                (COUNT COUNT)
  281.                (RETURN-VALUE (BLOCK (XRESTACKWINDOWS* DPY WINDOWS COUNT)
  282.                                     '())))
  283.               RETURN-VALUE))
  284. (DEFINE-FOREIGN XCHANGEWINDOWATTRIBUTES*
  285.                 ("XChangeWindowAttributes" (IN REP/C-POINTER)
  286.                                            (IN REP/INTEGER)
  287.                                            (IN REP/INTEGER)
  288.                                            (IN REP/C-POINTER))
  289.                 IGNORE)
  290. (DEFINE (XCHANGEWINDOWATTRIBUTES DPY W VALUEMASK ATTRIBUTES)
  291.         (LET* ((DPY (CHK-DISPLAYP DPY))
  292.                (W W)
  293.                (VALUEMASK VALUEMASK)
  294.                (ATTRIBUTES (CHK-XSETWINDOWATTRIBUTESP ATTRIBUTES))
  295.                (RETURN-VALUE (BLOCK (XCHANGEWINDOWATTRIBUTES* DPY
  296.                                                               W
  297.                                                               VALUEMASK
  298.                                                               ATTRIBUTES)
  299.                                     '())))
  300.               RETURN-VALUE))
  301. (DEFINE-FOREIGN XSETWINDOWBACKGROUND*
  302.                 ("XSetWindowBackground" (IN REP/C-POINTER)
  303.                                         (IN REP/INTEGER)
  304.                                         (IN REP/INTEGER))
  305.                 IGNORE)
  306. (DEFINE (XSETWINDOWBACKGROUND DPY W PIXEL)
  307.         (LET* ((DPY (CHK-DISPLAYP DPY))
  308.                (W W)
  309.                (PIXEL PIXEL)
  310.                (RETURN-VALUE (BLOCK (XSETWINDOWBACKGROUND* DPY W PIXEL)
  311.                                     '())))
  312.               RETURN-VALUE))
  313. (DEFINE-FOREIGN XSETWINDOWBACKGROUNDPIXMAP*
  314.                 ("XSetWindowBackgroundPixmap" (IN REP/C-POINTER)
  315.                                               (IN REP/INTEGER)
  316.                                               (IN REP/INTEGER))
  317.                 IGNORE)
  318. (DEFINE (XSETWINDOWBACKGROUNDPIXMAP DPY W PIXMAP)
  319.         (LET* ((DPY (CHK-DISPLAYP DPY))
  320.                (W W)
  321.                (PIXMAP PIXMAP)
  322.                (RETURN-VALUE (BLOCK (XSETWINDOWBACKGROUNDPIXMAP* DPY W PIXMAP)
  323.                                     '())))
  324.               RETURN-VALUE))
  325. (DEFINE-FOREIGN XSETWINDOWBORDER*
  326.                 ("XSetWindowBorder" (IN REP/C-POINTER)
  327.                                     (IN REP/INTEGER)
  328.                                     (IN REP/INTEGER))
  329.                 IGNORE)
  330. (DEFINE (XSETWINDOWBORDER DPY W PIXEL)
  331.         (LET* ((DPY (CHK-DISPLAYP DPY))
  332.                (W W)
  333.                (PIXEL PIXEL)
  334.                (RETURN-VALUE (BLOCK (XSETWINDOWBORDER* DPY W PIXEL) '())))
  335.               RETURN-VALUE))
  336. (DEFINE-FOREIGN XSETWINDOWBORDERPIXMAP*
  337.                 ("XSetWindowBorderPixmap" (IN REP/C-POINTER)
  338.                                           (IN REP/INTEGER)
  339.                                           (IN REP/INTEGER))
  340.                 IGNORE)
  341. (DEFINE (XSETWINDOWBORDERPIXMAP DPY W PIXMAP)
  342.         (LET* ((DPY (CHK-DISPLAYP DPY))
  343.                (W W)
  344.                (PIXMAP PIXMAP)
  345.                (RETURN-VALUE (BLOCK (XSETWINDOWBORDERPIXMAP* DPY W PIXMAP)
  346.                                     '())))
  347.               RETURN-VALUE))
  348. (DEFINE-FOREIGN XTRANSLATECOORDINATES*
  349.                 ("XTranslateCoordinates" (IN REP/C-POINTER)
  350.                                          (IN REP/INTEGER)
  351.                                          (IN REP/INTEGER)
  352.                                          (IN REP/INTEGER)
  353.                                          (IN REP/INTEGER)
  354.                                          (IN REP/EXTEND)
  355.                                          (IN REP/EXTEND)
  356.                                          (IN REP/EXTEND))
  357.                 REP/INTEGER)
  358. (DEFINE (XTRANSLATECOORDINATES DPY SRC_WIN DEST_WIN SRC_X SRC_Y)
  359.         (LET* ((DPY (CHK-DISPLAYP DPY))
  360.                (SRC_WIN SRC_WIN)
  361.                (DEST_WIN DEST_WIN)
  362.                (SRC_X SRC_X)
  363.                (SRC_Y SRC_Y)
  364.                (DST_X (MAKE-BYTEV 4))
  365.                (DST_Y (MAKE-BYTEV 4))
  366.                (CHILD (MAKE-BYTEV 4))
  367.                (RETURN-VALUE (XTRANSLATECOORDINATES* DPY
  368.                                                      SRC_WIN
  369.                                                      DEST_WIN
  370.                                                      SRC_X
  371.                                                      SRC_Y
  372.                                                      DST_X
  373.                                                      DST_Y
  374.                                                      CHILD)))
  375.               (RETURN RETURN-VALUE
  376.                       (MREF-INTEGER DST_X 0)
  377.                       (MREF-INTEGER DST_Y 0)
  378.                       (MREF-INTEGER CHILD 0))))
  379.